﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using ZOIL.DataModel;
using ZOIL.Framework.Presentation;
using System.Windows.Threading;
using System.Diagnostics;
using System.Windows.Ink;
using System.Globalization;
using System.Windows.Markup;
using System.Windows.Media.Animation;
using System.ComponentModel;

namespace ZOIL.Library.Components
{
    /// <summary>
    /// Interaction logic for MovieCardView.xaml
    /// </summary>
    [ViewFor(typeof(MovieCard), "default")]
    public partial class MovieCardView : ZComponent
    {
        private static Random _rnd = new Random();

        public static List<MovieCardView> allInstances = new List<MovieCardView>();

        ~MovieCardView()
        {
            allInstances.Remove(this);
        }

        public MovieCardView()
        {
            InitializeComponent();
            allInstances.Add(this);
        }

        private void ZComponent_MouseDown(object sender, MouseButtonEventArgs e)
        {
            ((Storyboard)FindResource("MouseDownStoryBoard")).Begin();
        }

        private void ZComponent_MouseUp(object sender, MouseButtonEventArgs e)
        {
            ((Storyboard)FindResource("MouseUpStoryBoard")).Begin();
        }

        private void HandleTabOnButton(object sender, Microsoft.Surface.Presentation.ContactEventArgs e)
        {
            e.Handled = true;
        }
    }
}
